﻿using MvcDemo.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MvcDemo.Controllers
{
    public class CustomerController : Controller
    {
        // GET: Customer
        public ActionResult Index()
        {
            return View();
        }

        public ActionResult ShowCustomer(int id=0)
        {
            Customer customer = new Customer() { Id = id, Age = 18, Email = "752075946", SName = "yang" };
            ViewData["Customer"] = customer;
            ViewData.Model = customer;

            return View();
        }

    }
}